package com.orhon.smartcampus.modules.student.mm;



import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.student.entity.Extend;
import com.orhon.smartcampus.modules.student.gqlModel.GQLExtends;

@Mapper(
        uses = {
                LangMapper.class
        }
)
public interface ExtendMapper {


    ExtendMapper MAPPER = Mappers.getMapper(ExtendMapper.class);


    @Mappings({
            @Mapping(source = "id" , target = "id"),
            @Mapping(source = "artdynamic_id" , target = "artdynamic_id"),
            @Mapping(source = "studentId" , target = "studentId"),
            @Mapping(source = "home_address" , target = "home_address"),
            @Mapping(source = "typecode" , target = "typecode"),
            @Mapping(source = "createdAt" , target = "created_at"),
            @Mapping(source = "updatedAt" , target = "updated_at"),
            @Mapping(source = "deletedAt" , target = "deleted_at")
        
    })
    GQLExtends toExtends(Extend entity);
    
    @InheritConfiguration(name = "toExtends")
    List<GQLExtends> toExtendsList(List<Extend> entities);
}
